<?php

namespace app\adminapi\controller\v1\marketing;

use app\adminapi\controller\AuthController;
use app\Request;
use app\services\activity\MarketingService;
use think\facade\App;

class Marketing extends AuthController
{
    public function __construct(App $app, MarketingService $services)
    {
        parent::__construct($app);
        $this->services = $services;
    }

    public function list(Request $request)
    {
        $type = $request->get('type', 1);
        $id = $request->get('id', 0);
        $limit = $request->get('limit', 15);
        $list = $this->services->getList($type, $id, $limit);
        return app('json')->success($list);
    }
}